/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package amd.core;

/**
 *
 * @author Latifah Dwi Nurachma
 */
import java.io.FileInputStream;
import java.util.Properties;

public class LoadXmlProperties {

    public static Properties readProperties(String configFile) throws ConfigFileNotFoundException {
        FileInputStream fis = null;
        Properties properties = new Properties();
        try {
            fis = new FileInputStream(configFile);
            properties.loadFromXML(fis);
        } catch (Exception e) {
            throw new ConfigFileNotFoundException(configFile);
        } finally {
            try {
                fis.close();
            } catch (Exception e) {}
        }
        return properties;
    }
}
